package com.lyf.util;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;

public class MyJob implements Job {

    //直接注入
    @Autowired
    private QuartzManager quartzManager;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            System.out.println("定时开始");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
